package web.suzy.oj.dao.msg.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import web.suzy.oj.dao.msg.AdminSysNoticeEntityService;
import web.suzy.oj.mapper.AdminSysNoticeMapper;
import web.suzy.oj.pojo.entity.msg.AdminSysNotice;
import web.suzy.oj.pojo.vo.AdminSysNoticeVO;

import javax.annotation.Resource;

/**
 * YangSuzy 软件工作室
 * 类名: AdminSysNoticeEntityServiceImpl
 * 描述: ---- 待定 -----
 * 功能: ---- 待定 -----
 *
 * @author YangSuzy
 * Date: 2022/11/18 12:27
 */
@Service
public class AdminSysNoticeEntityServiceImpl extends ServiceImpl<AdminSysNoticeMapper, AdminSysNotice> implements AdminSysNoticeEntityService {
    @Resource
    private AdminSysNoticeMapper adminSysNoticeMapper;

    /**
     * 方法名: getSysNotice
     * 描述: 分页查询管理员系统消息
     *
     * @param limit       每页显示数量
     * @param currentPage 当前页
     * @param type        消息类型
     * @return com.baomidou.mybatisplus.core.metadata.IPage<web.suzy.oj.pojo.vo.AdminSysNoticeVO>
     * @date 2022/11/18 12:28
     * @auther YangSuzy
     **/
    @Override
    public IPage<AdminSysNoticeVO> getSysNotice(int limit, int currentPage, String type) {
        Page<AdminSysNoticeVO> page = new Page<>(currentPage, limit);
        return adminSysNoticeMapper.getAdminSysNotice(page, type);
    }
}
